package ooday03;
/** 演示Duck类 */
public class Duck extends Animal implements Lay,Swim{
    Duck() {
    }
    Duck(String name, int age, String color) {
        super(name, age, color);
    }

    @Override
    void eat() {
        System.out.println(color + "色的" + age + "岁的小鸭" + name + "正在吃饭....");
    }


    @Override
    public void layEggs1() {
        System.out.println(color + "色的" + age + "岁的小鸭" + name + "正在下蛋....");
    }

    @Override
    public void swim() {
        System.out.println(color + "色的" + age + "岁的小鸭" + name + "正在游泳....");
    }
}
